// 对外暴露配置路由（常量路由）
export const constantRouter = [
  {
    path: '/login',
    component: () => import('@/views/login/index.vue'),
    name: 'login', //命名路由
  },
  {
    // 登录成功以后展示数据的路由
    path: '/',
    component: () => import('@/layout/index.vue'),
    name: 'layout',
    redirect: '/home',
    children: [
      { path: 'home', component: () => import('@/views/home/index.vue') },
      { path: 'about', component: () => import('@/views/about/index.vue') },
      { path: 'news', component: () => import('@/views/news/index.vue') },
      {
        path: 'materials',
        component: () => import('@/views/materials/index.vue'),
      },
      { path: 'contact', component: () => import('@/views/contact/index.vue') },
    ],
  },
  {
    path: '/404',
    component: () => import('@/views/404/index.vue'),
    name: '404',
    meta: {
      title: '404', //菜单标题
      hidden: true,
    },
  },
  {
    path: '/screen',
    component: () => import('@/views/screen/index.vue'),
    name: 'Screen',
    meta: {
      hidden: false,
      title: '数据大屏',
      icon: 'Platform',
    },
  },
  {
    path: '/:pathMatch(.*)*',
    redirect: '/404',
    name: 'Any',
    meta: {
      title: '任意路由', //菜单标题
      hidden: true,
    },
  },
]
